package com.efast.cafe.portal.dao.company;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.efast.cafe.portal.entity.company.PortalCompanyOrg;
import com.efast.cafe.portal.entity.company.PortalCompanyPosition;
import com.efast.cafe.portal.entity.company.PortalCompanyUserOrg;
import com.efast.cafe.portal.entity.company.PortalCompanyUserOrgListDto;

public interface PortalCompanyUserReporttoDao {
	
	public List<PortalCompanyUserOrg> queryUserOrgList();

	public List<PortalCompanyUserOrg> queryUserList(@Param("username")String username,@Param("companyCode")String companyCode);
	
	public List<PortalCompanyOrg> queryOrgList(@Param("companyCode")String companyCode);
	
	public List<PortalCompanyPosition> queryPositionList(@Param("companyCode")String companyCode,@Param("list")List list);
	//查询用户默认职位
	public PortalCompanyPosition queryUserOrgPosition(@Param("username")String username,@Param("companyCode")String companyCode);
	//修改户非默认职位
	public void updateUserOrgPosition(@Param("username")String username,@Param("companyCode")String companyCode,@Param("isDefault")Integer isDefault);
	//修改户为默认职位
	public void updateUserOrgPositionById(@Param("isDefault")Integer isDefault,@Param("id")Integer id);

	
	public List<PortalCompanyUserOrgListDto> queryUserListByCondition(@Param("username")String username,@Param("companyCode")String companyCode,@Param("phone")String phone,@Param("email")String email);


	public List<String> queryUsernameByPositionId(@Param("companyCode")String companyCode,@Param("positionId")Long positionId);

	public void addUsernameByPositionIdOrOrgId(@Param("companyCode")String companyCode,@Param("positionId")Long positionId,@Param("orgId")Long orgId,@Param("list")List list);

	public void deleteUsernameByPositionIdOrOrgId(@Param("companyCode")String companyCode,@Param("positionId")Long positionId,@Param("orgId")Long orgId,@Param("list")List list);

	public void deleteUsernameByOrgId(@Param("companyCode")String companyCode,@Param("orgId")Long orgId,@Param("username")String username);
	public List<String> queryUsernameByOrgId(@Param("companyCode")String companyCode,@Param("orgId")Long orgId);
}
